home *** CD-ROM | disk | FTP | other *** search
/ Aminet 19 / Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso / Aminet / disk / misc / NewHackdisk.lha / NewHackdisk / hackdisk.doc < prev    next >
Text File  |  1997-03-25  |  7KB  |  210 lines

  1. Hackdisk V2.04
  2.  
  3. By harry Sintonen
  4. Copyright (C) 1992,93 by Dan Babcock
  5. V2.03+ Copyright (C) 1996-1997 by Harry Sintonen
  6.  
  7.  
  8. ------------
  9. Distribution
  10. ------------
  11.  
  12. Hackdisk may be freely copied for non-commercial purposes (only).
  13.  
  14.  
  15. -----------------
  16. What is Hackdisk?
  17. -----------------
  18.  
  19. Hackdisk is a complete trackdisk.device replacement (although
  20. note that the support code for 5.25 inch drives has not been
  21. tested). Support for 150RPM drives is new for V2. It works with
  22. any version of Kickstart (tested with 1.3, 2.04, 3.0 and 3.1).
  23.  
  24.  
  25. ----------------------------
  26. What's wrong with trackdisk?
  27. ----------------------------
  28.  
  29. The standard trackdisk module works well, but it isn't perfect.
  30. My major gripe is that it doesn't offer a verify option. I used
  31. TrackSalve (a brilliant program by Dirk Reisig) before KS2.0 and
  32. received enough "verify error" messages to realize that this
  33. feature is very valuable. Hackdisk has a verify option that may
  34. be turned on or off at any time for any drive. The verify is very
  35. efficient and compares the raw MFM data bit-for-bit.
  36.  
  37. Hackdisk is faster than trackdisk 2.0. A DiskCopy to RAD: is 5
  38. seconds faster. A DiskCopy from RAD: with verify is only 1.6
  39. times slower than trackdisk, not 2 times slower like you might
  40. expect! Please note that this performance increase is gained by
  41. better programming, NOT by pushing the drive beyond its
  42. specifications.
  43.  
  44. Hackdisk requires more chip RAM for its verify buffer, but
  45. conserves memory by using one track buffer for all drives, rather
  46. than a track buffer for each drive. Experience shows that this
  47. does not hurt performance. Note: In V2, the size of chip RAM
  48. buffers has doubled to support high density drives. I decided not
  49. to dynamically adjust the buffer size for simplicity and to avoid
  50. dreaded memory fragmentation.
  51.  
  52. For programmers, Hackdisk eliminates the restrictions on
  53. read/write parameters. You can specify a read or write at any
  54. byte offset, any byte length, to/from any byte address.
  55.  
  56.  
  57. -------------------
  58. Installing Hackdisk
  59. -------------------
  60.  
  61. This is where I'll probably lose most of my audience. :-)
  62.  
  63. Hackdisk is a true replacement for trackdisk.device (and is
  64. called trackdisk.device as well), not some kind of patch.
  65. (Contrary to its name, it isn't a hack at all!). This presents
  66. some difficulties, since you can't just run it from the CLI.
  67. Four major alternatives are available for installing Hackdisk:
  68.  
  69.  
  70. 1) Use the MakeRes utility by Gunther Nikl. It can be found
  71. from Aminet (disk/misc/MakeRes.lha).
  72.  
  73.  
  74. 2) Use the 'RamKick' utility. RamKick is a Commodore-written
  75. program to kick in an alternative OS module. It was distributed
  76. and used with V35 of the OS, which was designed to support the
  77. hires monochrome display (Hedley/Moniterm). Unfortunately, I
  78. can't distribute it with Hackdisk due to the unknown copyright
  79. status. (No copyright or author message is included in the code).
  80. Anyway, here are some hints for using RamKick:
  81.  
  82. Type "ramkick ?" to see the options. If you don't know what
  83. everything does, don't worry, because I don't either! Use the
  84. "Kick" script as an example. (Note: It doesn't matter where you
  85. put hackdisk.device, but DEVS: is a good place). The Kick script
  86. uses a tiny program called "HackDiskTest" to test whether
  87. Hackdisk is installed. It will also print out the version number
  88. and copyright. Therefore you can put this at the start of your
  89. startup-sequence to have Hackdisk loaded whenever needed. If you
  90. have an autobooting hard drive, it won't slow down booting much.
  91.  
  92. Sometimes after booting a game or demo the machine will enter a
  93. infinite reboot cycle. This is caused by RamKick or Hackdisk
  94. being partially (but not fully) corrupted. RamKick should perform
  95. more extensive checksums...
  96.  
  97. 68040 users: RamKick must be patched to call _LVOColdReboot
  98. rather than using its own (rather crude) reset method. This is
  99. quite simple to do. If you need help, email me.
  100.  
  101.  
  102. 3) Replace trackdisk.device directly in the ROM. There are many
  103. variations to this. The brute force method is to burn a new
  104. kickstart EPROM. A more viable option for those with 030/040
  105. cards is to use special software to boot up with an alternative
  106. kickstart ROM image (soft-kicked A3000s have this ability built-
  107. in). For '030 users, I believe SetCPU by Dave Haynie has such an
  108. option. I use SetFF, which is the all-purpose control utility
  109. supplied with the Fusion 40 (68040) card. OK, assuming you have
  110. the magic utility in hand that is compatible with your hardware,
  111. how does one modify the kickstart image appropriately?
  112. Unfortunately, this is going to take quite a bit of technical
  113. knowledge. I'll blithely assume you can handle it and continue:
  114.  
  115. a) Locate the starting address of trackdisk.device in the ROM.
  116. You should see "trackdisk" and some kind of date/version string.
  117. Look backwards from that for a $4AFC. That address in the very
  118. beginning of the trackdisk module. Note: An easier method is to
  119. use the E option of Xoper.
  120.  
  121. b) Either reassemble (use Macro68) Hackdisk at this absolute
  122. address or use the 'HunkWiz' utility by Christian A. Weber (you
  123. can find this utility in the BeerMon distribution) to generate
  124. the absolute-address version.
  125.  
  126. c) Insert the absolute-address Hackdisk at the proper place in
  127. the kickstart image (use the monitor of your choice...I like Mon
  128. by Timo Rossi).
  129.  
  130. d) Calculate the new ROM checksum. Sadly, I don't have a nice
  131. program prepared to do this. Here is roughly the code required
  132. (for 512K ROMs):
  133.  
  134.     MOVE.L    #$300000,A0    ; starting address of ROM image
  135. ;    MOVE.L    #$300008,A1    ; if you want to preserve old value
  136.     MOVE.L    #$37FFE8,A1    ; address of magic checksum longword
  137.     CLR.L    (A1)
  138.     MOVE.L    #(512*1024/4)-1,D1
  139.     MOVEQ    #0,D0
  140. 1$:    ADD.L    (A0)+,D0
  141.     BCC.B    2$
  142.     ADDQ.L    #1,D0
  143. 2$:    DBF    D1,1$
  144.     SUB.L    #$10000,D1
  145.     BPL.B    1$
  146.     NOT.L    D0
  147.     MOVE.L    D0,(A1)
  148.     RTS
  149.  
  150. e) If you've made it this far, congratulations. You're ready to
  151. boot with the custom kickstart.
  152.  
  153.  
  154. 4) Owners of BLIZZARD turbo boards can use program called BlizKick,
  155. which features special feature to make hackdisk.device resident.
  156. BlizKick can be found from Aminet (util/boot/BlizKick.lha).
  157.  
  158. NOTE: In fact this new version of Hackdisk.device was made because
  159. V2.02 didn't work when softkicked. ;-)
  160.  
  161.  
  162. -------------------------
  163. Turning Verify Off and On
  164. -------------------------
  165.  
  166. By default, verify is ON for all drives. You can use my QMouse
  167. utility (public domain, on a Fish disk) to change the verify
  168. state, if desired.
  169.  
  170. Programmers: The verify bit is bit 1 of TDU_PUBFLAGS.
  171.  
  172.  
  173. -----
  174. Bugs?
  175. -----
  176.  
  177. Hackdisk is 3,000 lines of assembly and a fairly intricate piece
  178. of code (see Hackdisk.ASM) and pushes the hardware to the limit.
  179. Although I've tried my best, I only have three drives and one
  180. Amiga to test with. I can just hope it works as well for you as
  181. it does for me.
  182.  
  183. If there is something badly wrong in Hackdisk, I (Harry) might not
  184. be able to fix it. I'm not very good at disk drive hardware level
  185. programming... ;(
  186.  
  187.  
  188. -------
  189. Credits
  190. -------
  191.  
  192. Special thanks go to the following genuine Amiga wizards:
  193.  
  194. Dirk Reisig        - for TrackSalve
  195. Sebastiano Vigna    - for SuperDuper
  196. Mike Schwartz        - for sharing his game kernel etc.
  197. Dan Babcock             - for giving me his permission to
  198.                           distribute this new version
  199.  
  200. ------------------
  201. Author Information
  202. ------------------
  203.  
  204. Original author is Dan Babcock <danb@numega.com>.
  205.  
  206. V2.04 was released by Harry Sintonen <sintonen@jyu.fi>.
  207.  
  208. I (Harry) did only very minor changes to Hackdisk so "real"
  209. author of Hackdisk is Dan Babcock.
  210.